package datastructure.sort;

public abstract class AbstractArray {
	
	protected static int maxSize = 100;
	protected int[] a;
	protected int nElems;

	public AbstractArray(int max) {
		a = new int[max];
		nElems = 0;
	}

	public abstract void sort();
	
	
	public void insert(int value) // put element into array
	{
		a[nElems] = value;
		nElems++;
	}

	public void display()
	{
		for (int j = 0; j < nElems; j++)
			System.out.print(a[j]+" "); // display it
		System.out.println(" ");
	}

	protected void swap(int one, int two) {
		int temp = a[one];
		a[one] = a[two];
		a[two] = temp;
	}

}
